package com.order.feign.fallback;

import com.common.Result;
import com.order.feign.StorageServiceFeignClient;
import com.order.feign.dto.StorageDTO;
import org.springframework.stereotype.Component;
//fallback 和fallbackFactory需要依赖与流控组件一起使用的，hystrix或者sentinel
@Component
public class StorageCallFallback implements StorageServiceFeignClient {

    @Override
    public Result<?> reduceStock(StorageDTO productReduceStockDTO) {
        System.out.println("Storage service is unavailable, fallback method called.");
        return null;
    }
}
